<template>
  <div>
    <h3>用户名：{{ userName }}</h3>
    <h3>用户名：<input type="text" v-model="userName"></h3>
    
    
    <!-- <input type="text" v-model="password" @input="aa"> -->
    <input type="text" :value="userName" @input="aa">
    <br>
    <!-- <input type="text"> -->
  </div>
</template>

<script setup lang='ts' name="Father">
import type { isExpressionWithTypeArguments } from 'typescript';
import { ref, reactive } from 'vue'

let userName = ref("admin")
let password = ref("123456")


// 查看input的事件源
function aa(e: any) {
  console.log(e);
  console.log(e.target.value);
  
  userName.value = e.target.value

}

</script>


<style lang='scss' scoped></style>